package org.tissou.server.Operations;

import java.util.List;
import java.util.ArrayList;
import java.util.Date;

/**
 * Created by IntelliJ IDEA.
 * User: Claire
 * Date: 11-Jan-2009
 * Time: 15:39:49
 * To change this template use File | Settings | File Templates.
 */
public abstract class Operation_Base implements Operation {
  Date Date;
  String TypeTransaction_Nom;
  List<Transaction> Transactions = new ArrayList<Transaction>();

  public abstract List<Transaction> Retourne_Transactions();

  public List<Transaction> Construire_Transactions() {
    Transactions.clear();
    Transactions.addAll(Retourne_Transactions());
    return this.Transactions;
  }

  public void Entrer_Transactions(){
    if (Parametres_Compatibles()){
      Construire_Transactions();
      for (Transaction transaction : Transactions){
        transaction.Entrer_Transaction();
      }
    }
  }
}
